<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
<#assign base=request.contextPath  />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>首页</title>
    <link rel="stylesheet" href="../frame/layui/css/layui.css">
    <link rel="stylesheet" href="../frame/static/css/style.css">
    <link rel="icon" href="../frame/static/image/code.png">
    <script type="text/javascript" src="../frame/layui/layui.js"></script>
    <script src="${base}/js/jquery-1.8.3.min.js"></script>
    <style type="text/css">
        .fujia {
            height: 100px;
            height: 100px;
        }

        .layui-col-space10 {
            margin: 10px;
        }
        .layui-badge {

            height: 40px;
            line-height: 40px;

        }
        .layui-badge, .layui-badge-dot, .layui-badge-rim {

            font-size: 40px;

        }
        .my-index-main .my-nav-text:last-child {

            height: auto;
            font-size: 23px;

        }
    </style>
</head>
<body>
<div style="margin: 20px;">
    <h5 style="font-size: 18px; font-family: '微软雅黑';color: #777777;margin-top: 20px;">本次登录:<span id="logInfo"></span>
    </h5>
</div>
<hr class="layui-bg-blue">
<div class="layui-row layui-col-space10 my-index-main">
    <div class="layui-col-xs4 layui-col-sm3 layui-col-md3">
        <div class="my-nav-btn layui-clear" data-href="./demo/账户余额.html">
            <div class="layui-col-md5">
                <button class="layui-btn layui-btn-big layui-btn-danger layui-icon fujia">&#xe65e;</button>
            </div>
            <div class="layui-col-md7 tc">
                <p class="my-nav-text"><span class="layui-badge" id="ptCount">初始化中...</span></p>
                <a href="${base}/company/main.html"><p class="my-nav-text layui-elip">企业认证</p></a>
            </div>
        </div>
    </div>
<#--<div class="layui-col-xs4 layui-col-sm3 layui-col-md3">-->
<#--<div class="my-nav-btn layui-clear" data-href="./demo/用户管理.html">-->
<#--<div class="layui-col-md5">-->
<#--<button class="layui-btn layui-btn-big layui-btn-warm layui-icon fujia">&#xe770;</button>-->
<#--</div>-->
<#--<div class="layui-col-md7 tc">-->
<#--<p class="my-nav-text"><span class="layui-badge layui-bg-orange">200</span></p>-->
<#--<a href=""> <p class="my-nav-text layui-elip">桩源认证</p></a>-->
<#--</div>-->
<#--</div>-->
<#--</div>-->
    <div class="layui-col-xs4 layui-col-sm3 layui-col-md3">
        <div class="my-nav-btn layui-clear" data-href="./demo/租车.html">
            <div class="layui-col-md5">
                <button class="layui-btn layui-btn-big layui-bg-cyan layui-icon fujia">&#xe857;</button>
            </div>
            <div class="layui-col-md7 tc">
                <p class="my-nav-text"><span class="layui-badge layui-bg-cyan" id="carCount">初始化中...</span></p>
                <a href="${base}/comCar/main.html"><p class="my-nav-text layui-elip">车企认证</p></a>
            </div>
        </div>
    </div>
    <div class="layui-col-xs4 layui-col-sm3 layui-col-md3">
        <div class="my-nav-btn layui-clear" data-href="./demo/密码管理.html">
            <div class="layui-col-md5">
                <button class="layui-btn layui-btn-big layui-btn-normal layui-icon fujia">&#xe705;</button>
            </div>
            <div class="layui-col-md7 tc">
                <p class="my-nav-text"><span class="layui-badge layui-bg-blue" id="peopleCount">初始化中...</span></p>
                <a href="${base}/comPeople/main.html"><p class="my-nav-text layui-elip">个人认证</p></a>
            </div>
        </div>
    </div>

    <!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
    <div id="main-line" style="width: 600px;height:400px;float: left;"></div>

    <div id="main-bing" style="width: 400px;height:400px;float: right;"></div>
    <script language="javascript">
        function getCurDate() {
            var d = new Date();
            var week;
            switch (d.getDay()) {
                case 1:
                    week = "星期一";
                    break;
                case 2:
                    week = "星期二";
                    break;
                case 3:
                    week = "星期三";
                    break;
                case 4:
                    week = "星期四";
                    break;
                case 5:
                    week = "星期五";
                    break;
                case 6:
                    week = "星期六";
                    break;
                default:
                    week = "星期天";
            }
            var years = d.getFullYear();
            var month = add_zero(d.getMonth() + 1);
            var days = add_zero(d.getDate());
            var hours = add_zero(d.getHours());
            var minutes = add_zero(d.getMinutes());
            var seconds = add_zero(d.getSeconds());
            var ndate = years + "年" + month + "月" + days + "日 " + hours + ":" + minutes + " " + week;
            var divT = document.getElementById("logInfo");
            divT.innerHTML = ndate;
        }

        function add_zero(temp) {
            if (temp < 10) return "0" + temp;
            else return temp;
        }

        setInterval("getCurDate()", 100);
    </script>
    <script type="text/javascript" src="../frame/layui/layui.all.js"></script>
    <script type="text/javascript" src="../frame/echarts/echarts.min.js"></script>
    <script type="text/javascript">

        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main-line'));

        //        // 使用刚指定的配置项和数据显示图表。
        //        myChart.setOption({
        //            title: {
        //                text: '认证情况'
        //            },
        //            tooltip: {},
        //            legend: {
        //                data:['认证量']
        //            },
        //            xAxis: {
        //                data: ["春季","夏季","秋季","冬季"]
        //            },
        //            yAxis: {},
        //            series: [{
        //                name: '认证量',
        //                type: 'bar',
        //                data: [4687, 2000, 3600,1888]
        //            }]
        //        });
        //
        //        // 基于准备好的dom，初始化echarts实例
        //        var chart = echarts.init(document.getElementById('main-bing'));
        //
        //        // 配置
        //        chart.setOption({
        //            series : [
        //                {
        //                    name: '认证来源',
        //                    type: 'pie',
        //                    radius: '55%',
        //                    data:[
        //                        {value:500, name:'一线城市'},
        //                        {value:435, name:'二线城市'},
        //                        {value:310, name:'三线城市'},
        //                        {value:234, name:'四线城市'},
        //                        {value:135, name:'五线城市'}
        //                    ]
        //                }
        //            ]
        //        });

        layui.use(['element'], function () {
            var element = layui.element
                    , $ = layui.jquery;

            // you code ...


        });


        $.ajax({
            type: "POST", //提交方式
            url: "${base}/comUser/findWelcomCount",//路径
            success: function (data) {//返回数据根据结果进行相应的处理
                $("#peopleCount").text(data.peopleCount);
                $("#ptCount").text(data.ptCount);
                $("#carCount").text(data.carCount);
            }
        });

    </script>
</body>
</html>